﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bank
{
     class Deposit : Account, IWhitdrawable
    {
        public Deposit(Customer customer, double balance, double interestRate)
            : base(customer, balance, interestRate)
        {
        }

        public void WhitdrawAmount(double amount)
        {
            this.Balance -= amount;
        }

        public override double CalculateInterest(int months)
        {
            if (this.Balance > 1000)
            {
                return base.CalculateInterest(months);
            }
            else
            {
                return 0;
            }
        }
    }
}
